<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreatePageIconsTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::dropIfExists('page_icons');

        Schema::create('page_icons', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('page_style_id')->default(0)->nullable()->unsigned()->comment('页面样式');
            $table->string('name', 100)->comment('符号名');
            $table->string('areaid')->nullable()->comment('区域编号');
            $table->integer('bg')->default(0)->nullable()->unsigned()->comment('背景图');
            $table->integer('icon')->default(0)->nullable()->unsigned()->comment('使用符号');
            $table->integer('cover')->default(0)->nullable()->unsigned()->comment('遮罩效果');
            $table->text('opacity')->nullable()->comment('透明效果');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('page_icons');
    }
}
